<template>
  <div>
    <BasicTable @register="registerTable">
      <template #action="{ record }">
        <TableAction />
      </template>
    </BasicTable>
    <Drawer @register="registerDrawer" @success="handleSuccess" />
  </div>
</template>
<script lang="ts" setup name="exportLog">
import { BasicTable, TableAction } from '@/components/table';
import { useDrawer } from '@/components/drawer';
import { useBaseTable } from '@/hooks';

import { columns, searchFormSchema } from './data/data';
import { Api } from './data/api';
const [registerDrawer, { openDrawer }] = useDrawer();
const { prefixCls, tableContext, handleDelete, handleSuccess, handlePost, handleBatchDelete } = useBaseTable({
  designScope: 'exportLog-template',
  tableProps: {
    //表格标题
    title: '导出日志列表',
    //主键字段
    rowKey: 'exportLogId',
    //列表接口
    listUrl: Api.page,
    //删除接口
    delUrl: Api.remove,
    //列定义
    columns,
    //查询表单配置
    formConfig: {
      labelWidth: 120,
      schemas: searchFormSchema,
    },
    showActionColumn: false,
  },
});

const [registerTable, { reload }, { rowSelection, hasSelectedRows }] = tableContext;
</script>
